.\"     Title: remote-mch
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\"      Date: 05/18/2008
.\"    Manual: Re-Mote Testbed Framework
.\"    Source: remote-mci 2.0.git
.\"
.TH "REMOTE\-MCH" "1" "05/18/2008" "remote\-mci 2\.0\.git" "Re\-Mote Testbed Framework"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
remote-mch - Re-Mote mote control host
.SH "SYNOPSIS"
remote\-mch [options]
.sp
.SH "DESCRIPTION"
The mote control host manages mote devices and provides remote access to them through a mote control server\. On startup the mote host connects to the server and listens for incoming requests\. Requests allows motes to be programmed, started, stopped, and reset\. All console output from motes are forwarded to the server\.
.sp
The mote control host may be run both in the foreground and as a daemon\.
.sp
.SH "OPTIONS"
The following options are only usable on the command line\.
.PP
\-\-config=<path>
.RS 4
Path to the configuration file\. Defaults to "/etc/remote\-mch\.cfg"\.
.RE
.PP
\-\-help
.RS 4
Print usage help and exit\.
.RE
.PP
\-\-version
.RS 4
Print version info and exit\.
.RE
.SS "Configuration options"
In addition, to the above options the mote host accepts the following configuration options that can be specified either on the command line or in the configuration file\. An option set in the configuration file overrides any option set on the command line\.
.sp
On the command line use: \fI\-\-\fR <name> \fI=\fR <value>, e\.g\. \fI\-\-devicePath=/here\fR\. In the config file use: <name> \fI=\fR <value>, e\.g\. \fIdevicePath=/here\fR\. For boolean options the \fI=\fR and value may be left out to set the value to true\. See the example sections for more information\.
.PP
devicePath <string>
.RS 4
Path to the mote device hierarchy\. When not specified "/dev/remote/" is used\.
.RE
.PP
eventPipe <string>
.RS 4
Path to the fifo notifying the mote host of mote hotplug events\. By default the daemon listens on "/var/run/motehost\.events"\.
.RE
.PP
serverHost <string>
.RS 4
DNS or IP address of the mote server\. Default is localhost\.
.RE
.PP
serverPort <number>
.RS 4
Port number to use for connecting to the mote server\. The default port is 10001\.
.RE
.PP
retryInterval <number>
.RS 4
Number of seconds to wait between server connection retries\. Default is 30 seconds\.
.RE
.PP
daemonize <boolean>
.RS 4
Whether or not to run in the background as a daemon\. The default is to not run as a daemon\.
.RE
.SH "FILES"
The mote host uses the following configurable files\.
.PP
/etc/remote\-mch\.cfg
.RS 4
Default configuration file read on startup\.
.RE
.PP
/var/run/motehost\.events
.RS 4
Default file for listening on mote events\.
.RE
.SS "Mote device files"
For each mote managed by the mote host, the following device specific files are used\. The device path is configurable (default: "/dev/remote")\. MOTEMAC represents the MAC address of a mote\.
.PP
/dev/remote/MOTEMAC/programmer
.RS 4
Symbolic link to the mote programmer\. The programmer is called with the TTY as the first argument and path to the image file as the second argument\.
.RE
.PP
/dev/remote/MOTEMAC/controller
.RS 4
Symbolic link to the mote control program\.
.RE
.PP
/dev/remote/MOTEMAC/tty/control
.RS 4
Symbolic link to the mote control TTY\.
.RE
.PP
/dev/remote/MOTEMAC/tty/data
.RS 4
Symbolic link to the mote data TTY\.
.RE
.PP
/dev/remote/MOTEMAC/image
.RS 4
Temporary image file used when programming\.
.RE
.PP
/dev/remote/MOTEMAC/path
.RS 4
File containing the mote device path in the form of a path specifying the bus ID\. E\.g\. "/devices/pci0000:00/0000:00:10\.0/usb2/2\-1"\.
.RE
.PP
/dev/remote/MOTEMAC/platform
.RS 4
File containing the name of the mote platform\. E\.g\. "dig528\-2"\.
.RE
.SH "ENVIRONMENT VARIABLES"
The mote host does not use any externally defined environment variables\. When invoking the programmer and controller commands the mote host sets the following environment variables\.
.PP
platform
.RS 4
The mote platform, e\.g\. "MicaZ"\.
.RE
.PP
macaddress
.RS 4
The mote MAC address\.
.RE
.PP
tosaddress
.RS 4
The mote TOS address\.
.RE
.SH "EXAMPLES"
.PP
Using configuration options on the command line
.RS 4
If you only need to override the default values for the server host and port and don\'t want to use a configuration file, specify all option on the command line\.
.sp
.RS 4
.nf
$ remote\-mch \-\-serverHost=my\.server\.tld \-\-serverPort=10001 \-\-daemonize
.fi
.RE
.RE
.PP
A simple configuration file
.RS 4
The following configuration file sets the same values as the above example\.
.sp
.RS 4
.nf
# MCS location
serverHost=my\.server\.tld
serverPort=10001
# Run in the background
daemonize
.fi
.RE
.RE
.SH "COPYRIGHT"
.sp
.RS 4
.nf
Copyright (c) 2005\-2006 Esben Zeuthen <zept@diku\.dk>
Copyright (c) 2006\-2008 Jonas Fonseca <fonseca@diku\.dk>
Copyright (c) 2007\-2008 Rosta Spinarr <rostislav\.spinar@cit\.ie>
.fi
.RE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\.
.sp
.SH "SEE ALSO"
\fBremote\-mcs(1)\fR, \fBremote\-device\-add(7)\fR, \fBremote\-device\-remove(7)\fR, \fBremote\-device\-name(7)\fR
.sp
This program is part of the Re\-Mote Testbed Framework <http://remote\-testbed\.googlecode\.com/>\.
.sp
